package com.future.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.future.domain.ChatRoom;
import com.future.domain.Class;
import com.future.domain.DTO.ChatListDTO;
import com.future.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ChatRoomMapper extends BaseMapper<ChatRoom> {

    Long isChatRoomExisting(@Param("userIdA")Long userIdA, @Param("userIdB")Long userIdB);
    List<ChatListDTO> selectAllChatList(@Param("currentUserId") Long currentUserId);
    ChatListDTO selectChatDTO(@Param("chatRoomId")Long chatRoomId,
                                    @Param("currentUserId")Long currentUserId);
    List<Class> classListByteacherId(@Param("teacherId")Long teacherId);
    String selectClassName(@Param("classId")Long classId);
    List<Integer> selectUserRole(@Param("userId")Long userId);
    List<User> selectpsychologistUsers(@Param("offset")Integer offset,
                                       @Param("pageSize")Integer pageSize);
   Long countUserNum();
}
